﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DiamondDash.Utils
{
    /// <summary>
    /// 记分帮助类
    /// </summary>
    public class ScoreHelper
    {
        public static int CalcScore(int count, int combo)
        {
            return (int)(count * ((count - 2) * 58) * Math.Pow(1.15, combo - 1));
        }

        public static int GetCoin(int score)
        {
            return score / 1077;
        }

        public static int GetExp(int score)
        {
            return 100 + score / 10000;
        }

        public static int GetFinalScore(int score, int level)
        {
            return (int)(score * (1 + (GetLevelBonus(level) / 100d)));
        }

        public static int GetLevelBonus(int level)
        {
            return level - 1;
        }
    }
}
